package cn.dankal.basiclib.api;

import java.util.Map;

import cn.dankal.annotations.ApiFactory;
import cn.dankal.basiclib.pojo.BaseListResponse;
import cn.dankal.basiclib.pojo.BaseResponse;
import cn.dankal.basiclib.pojo.CreateGroupByPasswordEntity;
import cn.dankal.basiclib.pojo.JPushUserInfo;
import cn.dankal.basiclib.pojo.ProductEntity;
import cn.dankal.basiclib.pojo.RegisterJpushEntity;
import cn.dankal.basiclib.pojo.ReportReq;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

@ApiFactory(value = BaseApiByChat.class)
public interface ChatService {


    @GET("frontapi/jmessage/user/search")
    Observable<BaseResponse<BaseListResponse<JPushUserInfo>>> searchShop(@QueryMap Map<String, Object> params);


    @GET("frontapi/jmessage/initialization")
    Observable<BaseResponse<RegisterJpushEntity>> initialization();


    @POST("frontapi/jmessage/face-to-face-group/init")
    @FormUrlEncoded
    Observable<BaseResponse<CreateGroupByPasswordEntity>> faceToFaceInit(@Field("lon") String lon, @Field("lat") String lat,
                                                                         @Field("code") String code);

    @POST("frontapi/jmessage/face-to-face-group/create")
    @FormUrlEncoded
    Observable<BaseResponse<CreateGroupByPasswordEntity>> faceToFaceCreate(@Field("lon") String lon,
                                                                      @Field("lat") String lat,
                                                                         @Field("code") String code);

    @POST("frontapi/jmessage/face-to-face-group/join")
    @FormUrlEncoded
    Observable<BaseResponse<CreateGroupByPasswordEntity>> faceToFaceJoin(@Field("uuid") String uuid);

    @POST("frontapi/user-reports")
    Observable<BaseResponse<Object>> reports(@Body ReportReq req);

}
